package com.sampleCodesJava.day5Lists;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class ListExample {

	public static void main(String[] args) {
		String name[] = { new String("Kang"), new String("Shoon"),
				new String("Boston"), new String("Zamote") };

		List<String> l = Arrays.asList(name);
		int position = Collections.binarySearch(l, "Boston");
		

		System.out.println(position);
		
		Collections.sort(l);
		position = Collections.binarySearch(l, "Zamote");
		
		System.out.println(position);
	}

}
